package com.rpframework.core.mybatis.mapper;


import org.apache.ibatis.annotations.SelectProvider;

/**
 * 查询Mapper
 * Created by jump on 2016/8/24.
 */
public interface SelectMapper<T> {
    /**
     * 自定义字段查询
     *
     * @param record 实体类
     * @param field  字段信息 eg: a as b,SUM(A) ab
     * @param n      返回结果信息
     * @param <N>    返回结果集
     * @return 结果集
     */
    @SelectProvider(type = com.rpframework.core.mybatis.mapper.impl.SelectProvider.class, method = "dynamicSQL")
    <N> N selectByField(T record, String field, Class<N> n);
}
